package com.zone.service.service.impl;

import java.util.List;
import com.zone.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zone.service.mapper.VehicleOutboundMapper;
import com.zone.service.domain.VehicleOutbound;
import com.zone.service.service.IVehicleOutboundService;

/**
 * 车辆钥匙管理Service业务层处理
 * 
 * @author zone
 * @date 2025-10-29
 */
@Service
public class VehicleOutboundServiceImpl implements IVehicleOutboundService 
{
    @Autowired
    private VehicleOutboundMapper vehicleOutboundMapper;

    /**
     * 查询车辆钥匙管理
     * 
     * @param id 车辆钥匙管理主键
     * @return 车辆钥匙管理
     */
    @Override
    public VehicleOutbound selectVehicleOutboundById(Long id)
    {
        return vehicleOutboundMapper.selectVehicleOutboundById(id);
    }

    /**
     * 查询车辆钥匙管理列表
     * 
     * @param vehicleOutbound 车辆钥匙管理
     * @return 车辆钥匙管理
     */
    @Override
    public List<VehicleOutbound> selectVehicleOutboundList(VehicleOutbound vehicleOutbound)
    {
        return vehicleOutboundMapper.selectVehicleOutboundList(vehicleOutbound);
    }

    /**
     * 新增车辆钥匙管理
     * 
     * @param vehicleOutbound 车辆钥匙管理
     * @return 结果
     */
    @Override
    public int insertVehicleOutbound(VehicleOutbound vehicleOutbound)
    {
        vehicleOutbound.setCreateTime(DateUtils.getNowDate());
        return vehicleOutboundMapper.insertVehicleOutbound(vehicleOutbound);
    }

    /**
     * 修改车辆钥匙管理
     * 
     * @param vehicleOutbound 车辆钥匙管理
     * @return 结果
     */
    @Override
    public int updateVehicleOutbound(VehicleOutbound vehicleOutbound)
    {
        vehicleOutbound.setUpdateTime(DateUtils.getNowDate());
        return vehicleOutboundMapper.updateVehicleOutbound(vehicleOutbound);
    }

    /**
     * 批量删除车辆钥匙管理
     * 
     * @param ids 需要删除的车辆钥匙管理主键
     * @return 结果
     */
    @Override
    public int deleteVehicleOutboundByIds(Long[] ids)
    {
        return vehicleOutboundMapper.deleteVehicleOutboundByIds(ids);
    }

    /**
     * 删除车辆钥匙管理信息
     * 
     * @param id 车辆钥匙管理主键
     * @return 结果
     */
    @Override
    public int deleteVehicleOutboundById(Long id)
    {
        return vehicleOutboundMapper.deleteVehicleOutboundById(id);
    }
    
    /**
     * 批量插入车辆钥匙数据
     *
     * @param vehicleOutboundList 车辆钥匙数据列表
     * @return 结果
     */
    @Override
    public int batchInsertVehicleOutbounds(List<VehicleOutbound> vehicleOutboundList) {
        return vehicleOutboundMapper.batchInsertVehicleOutbounds(vehicleOutboundList);
    }
}